<template>
  <el-dialog :visible.sync="value" :before-close="cancel" size="medium">
    <template slot="title">查看层级设置</template>
    <div>
      <div class="level-title">层级设置：</div>
      <div class="level-name" v-for="(item,index) in levelList">{{item.name}}</div>
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button @click="cancel">取 消</el-button>
      <el-button type="primary" @click="cancel">确 定
      </el-button>
    </div>
  </el-dialog>
</template>

<script>

  import {form} from '@/build'
  import {withdrawLevelList} from '@/services/api/withdraw';
  export default {
    name: "auto-withdraw-dialog",
    mixins: [form],
    props: ['value', 'rowLevelId'],
    data() {
      return {
        levelList:[]
      }
    },
    mounted() {
      this.bindGet(withdrawLevelList, 'levelList', {
        beforeSend:()=>{
          return {levelId:this.rowLevelId}
        }
      });
      this.getAll();
    },
    methods: {
      cancel() {
        this.$emit('input', false);
      },
    },

  }
</script>

<style lang="scss" scoped>
  .level-title{
    margin-bottom: 10px;
  }
  .level-name{
    display: inline-block;
    min-width: 80px;
    margin-right: 20px;
    line-height: 30px;
  }
</style>
